//
//  CoreDataManager.h
//  CoreData
//
//  Created by dllo on 1/8/16.
//  Copyright © 2016 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <CoreData/CoreData.h>

@interface CoreDataManager : NSObject

+ (instancetype)shareCoreDataManager;

/**
 *  被管理对象上下文 (数据管理器)
 */
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
/**
 *  数据模型器
 */
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
/**
 *  数据连接器
 */
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
/**
 *  保存数据
 */
- (void)saveContext;
/**
 *  沙盒路径
 */
- (NSURL *)applicationDocumentsDirectory;

@end
